8e603da2f6d37c67851c78bdb766aa85b745f709,src/main/java/org/attoparser/markup/MarkupAttoParser.java,MarkupAttoParser,parseBuffer,#char[]#number#number#IAttoHandler#number#number#,89

Before Change


                } else if (inCloseElement) {
                    // This is a closing tag
                    
                    handler.handleStructure(buffer, current, (tagEnd - current) + 1, currentLine, currentCol);
                    inCloseElement = false;
                    
                } else if (inComment) {
                    // This is a comment! (obviously ;-))
                    
                    while (tagEnd - current < 7 || buffer[tagEnd - 1] != '-' || buffer[tagEnd - 2] != '-') {
                        // the '>' we chose is not the comment-closing one. Let's find again
                        
                        LocatorUtils.countChar(locator, buffer[tagEnd]);
                        tagEnd = MarkupParsingUtil.findNextStructureEndDontAvoidQuotes(buffer, tagEnd + 1, maxi, locator);
                        
                        if (tagEnd == -1) {
                            return new BufferParseResult(current, currentLine, currentCol, true);
                        }
                        
                    }
                    
                    handler.handleStructure(buffer, current, (tagEnd - current) + 1, currentLine, currentCol);
                    inComment = false;
                    
                } else if (inCdata) {
                    // This is a CDATA section
                    
                    while (tagEnd - current < 11 || buffer[tagEnd - 1] != ']' || buffer[tagEnd - 2] != ']') {
                        // the '>' we chose is not the comment-closing one. Let's find again
                        
                        LocatorUtils.countChar(locator, buffer[tagEnd]);
                        tagEnd = MarkupParsingUtil.findNextStructureEndDontAvoidQuotes(buffer, tagEnd + 1, maxi, locator);
                        
                        if (tagEnd == -1) {
                            return new BufferParseResult(current, currentLine, currentCol, true);
                        }
                        
                    }
                    
                    handler.handleStructure(buffer, current, (tagEnd - current) + 1, currentLine, currentCol);
                    inCdata = false;
                    
                } else if (inDocType) {
                    // This is a DOCTYPE clause
                    
                    handler.handleStructure(buffer, current, (tagEnd - current) + 1, currentLine, currentCol);
                    inDocType = false;
                    
                } else if (inXmlDeclaration) {
                    // This is an XML Declaration

                    handler.handleStructure(buffer, current, (tagEnd - current) + 1, currentLine, currentCol);
                    inXmlDeclaration = false;
                    
                } else if (inProcessingInstruction) {

After Change


                    // This is a closing tag

                    skipUntil =
                            handler.handleStructure(buffer, current, (tagEnd - current) + 1, currentLine, currentCol);
                    inCloseElement = false;
                    
                } else if (inComment) {
                    // This is a comment! (obviously ;-))
                    
                    while (tagEnd - current < 7 || buffer[tagEnd - 1] != '-' || buffer[tagEnd - 2] != '-') {
                        // the '>' we chose is not the comment-closing one. Let's find again
                        
                        LocatorUtils.countChar(locator, buffer[tagEnd]);
                        tagEnd = MarkupParsingUtil.findNextStructureEndDontAvoidQuotes(buffer, tagEnd + 1, maxi, locator);
                        
                        if (tagEnd == -1) {
                            return new BufferParseResult(current, currentLine, currentCol, true, skipUntil);
                        }
                        
                    }

                    skipUntil =
                            handler.handleStructure(buffer, current, (tagEnd - current) + 1, currentLine, currentCol);
                    inComment = false;
                    
                } else if (inCdata) {
                    // This is a CDATA section
                    
                    while (tagEnd - current < 11 || buffer[tagEnd - 1] != ']' || buffer[tagEnd - 2] != ']') {
                        // the '>' we chose is not the comment-closing one. Let's find again
                        
                        LocatorUtils.countChar(locator, buffer[tagEnd]);
                        tagEnd = MarkupParsingUtil.findNextStructureEndDontAvoidQuotes(buffer, tagEnd + 1, maxi, locator);
                        
                        if (tagEnd == -1) {
                            return new BufferParseResult(current, currentLine, currentCol, true, skipUntil);
                        }
                        
                    }

                    skipUntil =
                            handler.handleStructure(buffer, current, (tagEnd - current) + 1, currentLine, currentCol);
                    inCdata = false;
                    
                } else if (inDocType) {
                    // This is a DOCTYPE clause

                    skipUntil =
                            handler.handleStructure(buffer, current, (tagEnd - current) + 1, currentLine, currentCol);
                    inDocType = false;
                    
                } else if (inXmlDeclaration) {
                    // This is an XML Declaration

                    skipUntil =
                            handler.handleStructure(buffer, current, (tagEnd - current) + 1, currentLine, currentCol);
                    inXmlDeclaration = false;
                    
                } else if (inProcessingInstruction) {